<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/14
 * Time: 17:03
 */

namespace common\assets;


use yii\web\AssetBundle;

class BasicAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web/public';

    public function registerAssetFiles($view)
    {
        $jsLength = isset($this->js) && count($this->js) ? count($this->js) : 0;
        for($i = 0; $i < $jsLength; $i++){
            $this->js[$i] = $this->js[$i].'?v='.STATIC_CACHE_VERSION;
        }
        $cssLength = isset($this->css) && count($this->css) ? count($this->css) : 0;
        for($i = 0; $i < $cssLength; $i++){
            $this->css[$i] = $this->css[$i].'?v='.STATIC_CACHE_VERSION;
        }
        parent::registerAssetFiles($view); // TODO: Change the autogenerated stub
    }
}